{extend name="base_iframe" /}


{block name="body"}

{php}
  use constant\OrderStatus;
  use constant\PayStatus;
  use constant\ShippingStatus;
  use constant\PayNameStatus;
{/php}


<div class="row box-ota-info form-horizontal">
	<div class="col-md-12">

		<div class="col-md-12">&nbsp;</div>

		<div class="col-md-12">
          <div class="box box-danger box-solid">
            <div class="box-header with-border">
              <h3 class="box-title">基本信息</h3>

              <div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
              </div>
            </div>
            <div class="box-body">
            	<div class="form-group">
            		<div  class="col-sm-4"><strong>订单ID :</strong> {$orderInfo.id}</div>
            		<div  class="col-sm-4"><strong>订单号 :</strong> {$orderInfo.order_sn}</div>
            		<div  class="col-sm-4"><strong>会员ID :</strong> {$orderInfo.user_id}</div>
            	</div>

            	<div class="form-group">
            		<div  class="col-sm-4"><strong>Email :</strong> {$orderInfo.email|default="--"}</div>
            		<div  class="col-sm-4"><strong>电话 :</strong> {$orderInfo.mobile}</div>
            		<div  class="col-sm-4"><strong>商品总额 :</strong> {$orderInfo.total_amount}</div>
            	</div>

            	<div class="form-group">
            		<div  class="col-sm-4"><strong>订单状态 :</strong> {:OrderStatus::$cn[$orderInfo.order_status]}</div>
            		<div  class="col-sm-4"><strong>支付状态 :</strong> {:PayStatus::$cn[$orderInfo.pay_status]}</div>
            		<div  class="col-sm-4"><strong>发货状态 :</strong> {:ShippingStatus::$cn[$orderInfo.shipping_status]}</div>
            	</div>

            	<div class="form-group">
            		<div  class="col-sm-4"><strong>下单时间 :</strong> {$orderInfo.add_time|date="Y-m-d H:i:s",###}</div>
            		{php}
            			if ($orderInfo['pay_time'] == 0) {
            				$abc = '未支付';
            			} else {
            				$abc = date("Y-m-d H:i:s",$orderInfo['pay_time']);
            			}
            		{/php}
            		<div  class="col-sm-4"><strong>支付时间 :</strong> {$abc}</div>
            		<div  class="col-sm-4"><strong>支付方式 :</strong> {$orderInfo.pay_name|default="--"}</div>
            	</div>

            	<div class="form-group">
            		<div  class="col-sm-4"><strong>发票抬头 :</strong> {$orderInfo.invoice_title|default="--"}</div>
            	</div>
            </div>
          </div>
        </div>

		<div class="col-md-12">
			<div class="box box-info box-solid">
				<div class="box-header with-border">
					<h3 class="box-title">收货信息</h3>
					<div class="box-tools pull-right">
						<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
						</button>
					</div>
				</div>

				<div class="box-body">

					<div class="panel-body" id="specList">
						<div class="form-group">
							<div  class="col-sm-4"><strong>收货人 :</strong> {$orderInfo.consignee}</div>
							<div  class="col-sm-4"><strong>联系电话 :</strong> {$orderInfo.mobile}</div>
							<div  class="col-sm-4"><strong>邮编 :</strong> {$orderInfo.zipcode}</div>
						</div>
					</div>

					<div class="panel-body" id="specList">
						<div class="form-group">
							<div  class="col-sm-12"><strong>收货地址 :</strong> {$orderInfo.province} {$orderInfo.city} {$orderInfo.area} {$orderInfo.addr}</div>
						</div>
					</div>

					<div class="panel-body" id="specList">
						<div class="form-group">
							<div  class="col-sm-4"><strong>配送方式 :</strong> {$orderInfo.shipping_name|default="--"}</div>
							<div  class="col-sm-8"><strong>发货单号 :</strong> {$orderInfo.deliver_sn|default="--"}
							{if condition="$orderInfo.deliver_sn"}
								<button type="button" order-id={$orderInfo.id} data-url={:url('admin/order/editDeliver')} proc-url="{:url('admin/order/deliverGoodsProc')}" class="btn btn-primary btn-xs edit-btn"> 编辑发货信息</button>

								<button type="button"  order-id={$orderInfo.id} data-url={:url('admin/order/trimPrice')} class="btn btn-success btn-xs shipping-btn"> 物流信息</button>
							{/if}
							</div>
						</div>
					</div>

					<div class="panel-body" id="specList">
						<div class="form-group">
							<div  class="col-sm-12"><strong>留言 :</strong> {$orderInfo.user_remark|default="--"}</div>
						</div>
					</div>

				</div>
			</div>
		</div>



		<div class="col-md-12">
			<div class="box box-info box-solid">
				<div class="box-header with-border">
					<h3 class="box-title">商品信息</h3>
					<div class="box-tools pull-right">
						<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
						</button>
					</div>
				</div>

				<div class="box-body">
					<table class="table">
						<tr class="info">
							<th>商品名</th>
							<th>LOGO</th>
							<th>规格属性</th>
							<th>数量</th>
							<th>单品价格</th>
							<th>小计</th>
						</tr>
					{volist name="goodsInfo" id="v"}
					  <tr class="active">
					    <td >{$v.goods_name}</td>
					    <td >
					    	<img src={$v.goods_image|show_image="goods",###} alt="..." class="img-thumbnail" width="40">
					    </td>
					    <td >{$v.spec_key_name|default="没有对应规格信息"}</td>
					    <td >{$v.quantity}</td>
					    <td >{$v.price}</td>
					    <td >{$v.price * $v.quantity}</td>
					  </tr>
					 {/volist}
					</table>
				</div>

			</div>
		</div>

		<div class="col-md-12">
			<div class="box box-info box-solid">
				<div class="box-header with-border">
					<h3 class="box-title">费用信息</h3>
					<div class="box-tools pull-right">
						<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
						</button>
					</div>
				</div>

				<div class="box-body">
					<div class="form-group">
						<div  class="col-sm-4"><strong>商品总额 :</strong> {$orderInfo.total_amount}</div>
						<div  class="col-sm-4"><strong>运费 :</strong> {$orderInfo.shipping_price}</div>
						<div  class="col-sm-4"><strong>价格调整 :</strong> {$orderInfo.fine_tune_price}
						{if condition="$orderInfo.pay_status eq 1"}
							<button type="button" old-value="{$orderInfo.fine_tune_price}" order-id={$orderInfo.id} data-url={:url('admin/order/trimPrice')} class="btn btn-primary btn-xs trim-btn"> 微调价格</button>
						{/if}
						</div>
					</div>

					<div class="form-group">
						<div  class="col-sm-4"><strong>应付 :</strong> <font color="#FF0000">{$orderInfo.actual_price}</font> </div>
					</div>
				</div>

			</div>
		</div>


	</div>
</div>



{/block}

{block name="script"}
	<script type="text/javascript" src="__AJS__/order/detail.js"></script>
{/block}